package cn.ac.jaas.isc.vegetable.pbms.api.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 厂商表
 *
 * @author 张高昌
 * @date 2022-05-14 17:41:34
 */
@Data
@TableName("arc_manufacturer")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "厂商表")
public class ArcManufacturer extends Model<ArcManufacturer> {

    private static final long serialVersionUID = 1L;

    /**
     * 厂商id
     */
    @TableId
    @ApiModelProperty(value = "厂商id")
    private Integer manufacturerId;

    /**
     * 厂商名称
     */
    @NotBlank(message = "厂商名称不能为空")
    @Length(min = 2, max = 60, message = "厂商名称必须由2~60个字组成")
    @ApiModelProperty(value = "厂商名称")
    private String manufacturerName;

    /**
     * 厂商编码
     */
    @NotBlank(message = "厂商编码不能为空")
    @Length(min = 1, max = 30, message = "厂商编码必须由1~30个字组成")
    @ApiModelProperty(value = "厂商编码")
    private String manufacturerCode;

    /**
     * 厂商类型1设备2装置
     */
    @NotNull(message = "厂商类型不能为空")
    @Min(value = 1, message = "厂商类型最小值不能小于1")
    @Max(value = 2, message = "厂商类型最大值不能超过2")
    @ApiModelProperty(value = "厂商类型1设备2装置")
    private Integer type;

    /**
     * 是否删除[0:未删除|1:已删除][sys_del_flag]
     */
    @ApiModelProperty(value = "是否删除[0:未删除|1:已删除][sys_del_flag]")
    private Integer delFlag;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private Integer createUser;

    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    private LocalDateTime updateTime;

    /**
     * 修改人
     */
    @ApiModelProperty(value = "修改人")
    private Integer updateUser;

}
